home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / indent~1.zoo / memcpy.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-20  |  330 b   |  17 lines

  1. /* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
  2.    if the source overlaps with the destination.
  3.    Return DESTADDR. */
  4.  
  5. char *
  6. memcpy (destaddr, srcaddr, len)
  7.      char *destaddr;
  8.      char *srcaddr;
  9.      int len;
  10. {
  11.   char *dest = destaddr;
  12.  
  13.   while (len-- > 0)
  14.     *destaddr++ = *srcaddr++;
  15.   return dest;
  16. }
  17.